/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.edu.kamai.client.upload;

import com.edu.kamai.config.Constant;
import com.edu.kamai.utility.FileOperation;

/**
 *
 * @author xyzhu
 */
public class UploadAnswer extends Thread{

    public UploadAnswer(){
        
    }
    
    public UploadAnswer(String fn){
        filename = fn;
    }
    
    
    
    @Override
    public void run() {
        String url = Constant.upLoadUrl;
        PostFile p = new PostFile(filename, url);
        try{
            p.uploadFile();
        }catch(Exception ex){
            ex.printStackTrace();
        }
        
        System.out.println("paperName:" + filename);
        FileOperation.deleteFile(filename);
    }
    
    
    String filename;
}
